Release 10.1A: OpenEdge Data Management:
DataServer for Microsoft SQL Server
FIND statements
The DataServer fully supports the
FINDFIRST,CURRENT,LAST,PREV, andNEXTstatements for MSS data source tables that have unique indexes. If a table has no unique index, only theFINDFIRSTandFINDNEXTstatements are available for that table. The following section provides additional information about specificFINDstatements.FIND NEXT statement
The
FINDNEXTstatement can generate different results with the DataServer when compared to the same statement executed against an OpenEdge database. AFINDNEXTstatement refers to a previousFINDstatement only if theWHEREclauses of each statement are identical. If theWHEREclauses are different, or if one of the statements does not have aWHEREclause, theFINDNEXTwill behave like aFINDFIRSTstatement.FIND PREV and FIND LAST statements
Applications that use the
FINDPREVorFINDLASTstatements work on tables in a manner consistent with the OpenEdge database. The only exception occurs when theFINDPREVorFINDLASTstatement fails. In OpenEdge, the cursor is located after the last record that was scanned. In the MSS data source, the cursor behaves as if the failedFINDhad never occurred. To support these statements, a table must include support for the ProgressROWIDfunction (through either aPROGRESS_RECIDcolumn or an indexedNUMBERcolumn with unique values). See the "ROWID function" section for more information.For example, the procedure find.p accesses OpenEdge and MS SQL Server databases using the same
FINDandFINDPREVstatements in each case, as shown:
When you run
find.pwith an OpenEdge table and an MSS table, you get the following results (assuming that the database has records for customer numbers 1 through 4):
![]()
If the
FINDPREVstatement fails, the cursor remains located aftercustomer.cust-num3in the OpenEdge table, which was the last record scanned. In the data source table, the cursor is positioned atcust-num2. Failed finds do not affect cursor position in data source tables.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |